<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
  <script>
       var obj={
           name:'yao',
           age:28
       }
       for(var i=0; i<obj.length; i++){
    console.log(obj[i])
       }
  </script>
</body>
</html>